<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	template="/layout/template.xhtml">

	<ui:define name="body">
		<h:form id="accountDetailsForm">
			<rich:panel>
				<f:facet name="header">#{messages.AccountDetails}</f:facet>

				<s:decorate>

					<s:decorate id="name" template="/layout/edit.xhtml">
						<ui:define name="label">#{messages.Name}</ui:define>
						<h:inputText id="name" required="false"
						value="#{userHome.instance.name}" />
					</s:decorate>
					
					<s:decorate id="surname" template="/layout/edit.xhtml">
						<ui:define name="label">#{messages.Surname}</ui:define>
						<h:inputText id="surnamefield" required="false"
						value="#{userHome.instance.surname}" />
					</s:decorate>
					
					<s:decorate id="pass" template="/layout/edit.xhtml">
						<ui:define name="label">#{messages.Password}</ui:define>
						<h:inputSecret id="password" value="#{userHome.password}" />
					</s:decorate>

					<s:decorate id="newPass" template="/layout/edit.xhtml">
						<ui:define name="label">#{messages.NewPassword}</ui:define>
						<h:inputSecret id="password" value="#{userHome.firstPass}" />
					</s:decorate>

					<s:decorate id="newPass2" template="/layout/edit.xhtml">
						<ui:define name="label">#{messages.NewPassword2}</ui:define>
						<h:inputSecret id="password" value="#{userHome.secondPass}">
							<rich:ajaxValidator event="onblur"></rich:ajaxValidator>
						</h:inputSecret>

					</s:decorate>
					<div style="clear: both" />
				</s:decorate>
				<div class="actionButtons">
					<h:commandButton id="save" value="Save"
						action="#{userHome.savePass()}" />
					<s:button propagation="end" id="cancel" value="Cancel"
						view="/home.xhtml" />
				</div>

			</rich:panel>
		</h:form>
	</ui:define>

</ui:composition>